﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>ORDGetScalableMeshSurfacesList</Title>
      <Author>innovoCAD</Author>
      <Description>Code snippet for getting ScalableMeshSurfaces string name list.</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>ORDGetScalableMeshSurfacesList</Shortcut>
    </Header>
    <Snippet>
	     <References>
        <Reference>
          <Assembly>Bentley.CifNET.GeometryModel.SDK.4.0</Assembly>
        </Reference>
      </References>
      <Imports>
	  <Import>
          <Namespace>System.Collections.Generic</Namespace>
        </Import>
        <Import>
          <Namespace>SDK = Bentley.CifNET.GeometryModel.SDK</Namespace>
        </Import>
      </Imports>
      <Code Language="vb" Delimiter="$"><![CDATA[    ''' <summary>Get ScalableMeshSurfaces  string name list.</summary>
    Private ReadOnly Property GetScalableMeshSurfaces As List(Of String)
        Get
            Dim scalableMeshSurfacedNames As List(Of String) = New List(Of String)()

            'Checking for Active SDK connection and ScalableMeshSurfaces nullification
            If SDKCon.GetActive() Is Nothing Or SDKCon.GetActive().ScalableMeshSurfaces Is Nothing Then
                scalableMeshSurfacedNames.Add("None")
            Else
                For Each scalableMeshSurface As SDK.ScalableMeshSurface In SDKCon.GetActive().ScalableMeshSurfaces
                    If Not String.IsNullOrEmpty(scalableMeshSurface.Name) Then scalableMeshSurfacedNames.Add(scalableMeshSurface.Name)
                Next
            End If

            scalableMeshSurfacedNames.Sort()
            Return scalableMeshSurfacedNames
        End Get
    End Property
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>